home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / SmallEiffel 0.3.3 / SmallEiffel 68k / lib_test / test_file_exists.e < prev    next >
Encoding:
Text File  |  1996-06-13  |  725 b   |  36 lines  |  [TEXT/EDIT]

  1. -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C) 
  2. -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
  3. --
  4. class TEST_FILE_EXISTS
  5.  
  6. creation {ANY}
  7.    make
  8.    
  9. feature {ANY}
  10.    
  11.    make is
  12.       local
  13.      path: STRING;
  14.       do
  15.      path := get_environment_variable("SmallEiffel");
  16.      is_true(path /= Void);
  17.      path.append("/lib_test/test_file_exists.e");
  18.      is_true(file_exists(path));
  19.       end;
  20.    
  21.    is_true(b: BOOLEAN) is
  22.       do
  23.      cpt := cpt + 1;
  24.      if not b then
  25.         std_output.put_string("TEST_FILE_EXISTS: ERROR Test # ");
  26.         std_output.put_integer(cpt);
  27.         std_output.put_string("%N");
  28.      else
  29.         -- std_output.put_string("Yes%N");
  30.      end;
  31.       end;
  32.    
  33.    cpt: INTEGER;
  34.    
  35. end -- TEST_FILE_EXISTS
  36.